package com.nothing.util;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;

public class ExcutorUtil {
	
	//相似度
    public static int passRate = 80;
    
    public static boolean isTakeRunning = true;
	public static boolean isRunning = true;
	public static boolean toCheck = false;
	public static boolean toTakePicture = false;
	public static boolean isScanRunning = true;
    
	
	public static final ExecutorService executorService = Executors.newFixedThreadPool(1,new ThreadFactory(){  
		public Thread newThread(Runnable r){  
	        Thread thread = new Thread(r);thread.setDaemon(true);return thread;  
	    }  
	});   
	
	public static final ExecutorService tokePool = Executors.newFixedThreadPool(1);    
	
	public static final ExecutorService serviceCheck = Executors.newFixedThreadPool(3);//, new ThreadFactory(){  
	
	public static final ExecutorService serviceSaveImg = Executors.newFixedThreadPool(3);//, new ThreadFactory(){  
	public static ExecutorService dbExecutorService = Executors.newFixedThreadPool(1);//,new ThreadFactory(){  
//
//	        public Thread newThread(Runnable r){  
//            Thread thread = new Thread(r);thread.setDaemon(true);return thread;  
//        }  
//    }); 
	public static ExecutorService compareExecutorService;

	//        public Thread newThread(Runnable r){  
//            Thread thread = new Thread(r);thread.setDaemon(true);return thread;  
//        }  
//    });    
	public static final ExecutorService serviceScan = Executors.newFixedThreadPool(1);   
}
